package com.ball.dev.controller;


import com.ball.common.dtos.ResponseResult;
import com.ball.dev.entity.po.Problem;
import com.ball.dev.service.IProblemService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**

 * 调查问卷
 * </p>
 *
 * @author lou
 * @since 2024-04-15
 */
@RestController
@RequestMapping("/problem")
@RequiredArgsConstructor
public class ProblemController {

    private final IProblemService problemService;
   //添加问题
    @PostMapping("/add")
    public ResponseResult add(@RequestBody Problem problem){
        return problemService.addProblem(problem);
    }

    //获取问题列表
    @GetMapping("listProblem")
    public ResponseResult listProblem(){
        return problemService.listProblem();
    }

}
